<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.front.servlets.security.WjJymm"%>
<%@page import="com.blockchain.common.enums.IsPass"%>
<html>
<head>
<%
String str = languageDefine.getValue(request, "modifyTradePassword_modifyTradePassword");
String _TITLE_ = str + "- "+configureProvider.getProperty(SystemVariable.SITE_NAME);
CURRENT_SUB_CATEGORY="XGJYMA"; 
PC_TITLE_NAME="XGJYMA";
%>
<title><%=_TITLE_ %></title>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
</head>
<%@include file="/WEB-INF/include/header.jsp"%>
<%@include file="/WEB-INF/include/authenticatedSession.jsp"%>
 <div class="autobox">
 <div class="now">
  <a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.Index.class)%>" class="orange"><%=languageDefine.getValue(request, "menu_home")%></a>&gt; <a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.security.index.class)%>" class="orange"><%=languageDefine.getValue(request, "menu_safeCenter")%></a> &gt; <%=languageDefine.getValue(request, "modifyTradePassword_modifyTradePassword")%>
 </div>
 <div class="assets_center clear po_re zin70">
 	<%@include file="/WEB-INF/include/aqzx/left.jsp"%>
  <div class="assets_content w900 right bg_w">
            <div class="safe_center clear" style="padding-left: 0px;">
                <h1 style="margin-top: 0px; margin-bottom: 15px; line-height: 15px;"><%=languageDefine.getValue(request, "modifyTradePassword_modifyTradePassword")%></h1>
            </div>
            <div class="pwtrade">
                <form id="form-pw" class="pw" action="<%=controller.getURI(request, UpdateJymm.class)%>" method="post" onsubmit="return onSubmit()" >
                    <dl>
                        <dt><%=languageDefine.getValue(request, "modifyTradePassword_tradePassword")%>：</dt>
                        <dd>
                            <input type="password" id="oldpassword" name="oldpassword">
                        </dd>
                    </dl>
                    <dl>
                        <dt><%=languageDefine.getValue(request, "modifyTradePassword_newTradePassword")%>：</dt>
                        <dd>
                            <input type="password" id="newpassword" name="newpassword">
                        </dd>
                    </dl>
                    <dl>
                        <dt><%=languageDefine.getValue(request, "modifyTradePassword_newPasswordAgain")%>：</dt>
                        <dd>
                            <input type="password" id="repassword" name="repassword">
                            <a href="<%=controller.getURI(request, WjJymm.class)%>" class="c_orange ml20"><%=languageDefine.getValue(request, "modifyTradePassword_forgetTradePassword")%></a>
                           <%
                           	String error = controller.getPrompt(request,response,PromptLevel.ERROR);
                           
                          // error = null!=error?error.indexOf("err_")!=-1?languageDefine.getValue(request, error):error:"";
                           if(null!=error&&-1!=error.indexOf("err_")){
                             	error = languageDefine.getValue(request, error);
                           }
                           %>
                            <%-- <div class="com_warning" style="height: 20px;"><%=languageDefine.getValue(request,error)%></div> --%>
                        </dd>
                    </dl>
                    <dl>
                        <dt></dt>
                        <dd>
                            <input type="submit" value='<%=languageDefine.getValue(request, "modifyTradePassword_save")%>' >
                        </dd>
                    </dl>
                </form>
            </div>
        </div>
 </div>
</div>
<%@include file="/WEB-INF/include/footer.jsp"%>
<%@include file="/WEB-INF/include/script.jsp"%>
<script type="text/javascript">
<%String info = controller.getPrompt(request,response,PromptLevel.INFO);if(!StringHelper.isEmpty(info)){%>
	var url='<%=controller.getURI(request, Logout.class)%>';	
	layer.open({
  	title: '<%=languageDefine.getValue(request, "js_tip")%>',
  	content: '<%=languageDefine.getValue(request, "js_modifyTradePasswordSuccess")%>',
}); 	
	
<%}%>
	function onSubmit() {
		var oldpassword = $("#oldpassword").val();
		var newpassword = $("#newpassword").val();
		var repassword = $("#repassword").val();
		if (oldpassword == null || oldpassword == '') {
			layer.tips('<%=languageDefine.getValue(request, "js_enterTradePassword")%>', '#oldpassword', {
				tips : 3
			});
			return false;
		}
		if (newpassword == null || newpassword == '') {
			layer.tips('<%=languageDefine.getValue(request, "js_enterNewTradePassword")%>', '#newpassword', {
				tips : 3
			});
			return false;
		}
		if (newpassword.length<6 || newpassword.length >16) {
			layer.tips('<%=languageDefine.getValue(request, "js_passwordReg")%>', '#newpassword', {
				tips : 3
			});
			return false;
		}
		if (repassword == null || repassword == '') {
			layer.tips('<%=languageDefine.getValue(request, "js_newTradePasswordAgain")%>', '#repassword', {
				tips : 3
			});
			return false;
		}
		if(newpassword != repassword){
			layer.tips('<%=languageDefine.getValue(request, "js_TradePasswordNotSame")%>', '#repassword', {tips:3});
			return false;
		}
		return true;
	}
</script>
</body>
</html>	
